<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>数组筛选</title>
	</head>
	<body>
		<script>
			
			var num=parseInt(prompt("请输入筛选数字"));
			var arr=[];
			while(true){
				var arr_num=parseInt(prompt("请输入数组"));
				arr.push(arr_num);
				var choice=prompt("是否继续输入，结束输入no");
				if(choice=='no'){
					break;
				}
			}
			function screen(num){
				var newArr=[];
				for(var i=0;i<arr.length;i++){
					if(arr[i]>num){
						newArr.push(arr[i]);
					}
				}
				return newArr;
			}
			console.log(screen(num));
		</script>
	</body>
</html>
